home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1993 July / InfoMagic USENET CD-ROM July 1993.ISO / sources / misc / volume12 / mush / part01 < prev    next >
Encoding:
Text File  |  1990-05-05  |  54.2 KB  |  1,699 lines

  1. Newsgroups: comp.sources.misc
  2. subject: v12i029: Mail User's Shell, Part01/19
  3. from: argv@Eng.Sun.COM (Dan Heller)
  4. Sender: allbery@uunet.UU.NET (Brandon S. Allbery - comp.sources.misc)
  5.  
  6. Posting-number: Volume 12, Issue 29
  7. Submitted-by: argv@Eng.Sun.COM (Dan Heller)
  8. Archive-name: mush/part01
  9.  
  10. #! /bin/sh
  11. # This is a shell archive.  Remove anything before this line, then feed it
  12. # into a shell via "sh file" or similar.  To overwrite existing files,
  13. # type "sh file -c".
  14. # The tool that generated this appeared in the comp.sources.unix newsgroup;
  15. # send mail to comp-sources-unix@uunet.uu.net if you want that tool.
  16. # If this archive is complete, you will see the following message at the end:
  17. #        "End of archive 1 (of 19)."
  18. # Contents:  mush mush/mush.1.c mush/strings.h
  19. # Wrapped by argv@turnpike on Wed May  2 13:59:17 1990
  20. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  21. if test ! -d 'mush' ; then
  22.     echo shar: Creating directory \"'mush'\"
  23.     mkdir 'mush'
  24. fi
  25. if test -f 'mush/mush.1.c' -a "${1}" != "-c" ; then 
  26.   echo shar: Will not clobber existing file \"'mush/mush.1.c'\"
  27. else
  28. echo shar: Extracting \"'mush/mush.1.c'\" \(50362 characters\)
  29. sed "s/^X//" >'mush/mush.1.c' <<'END_OF_FILE'
  30. XIf the mailbox were already sorted by author,
  31. X.sp
  32. X.ti +2
  33. Xpick \-f argv@zipcode.com | sort \-s
  34. X.sp
  35. Xwould find all messages from the user \*Qargv@zipcode.com\*U
  36. Xand sort them by subject.
  37. XYou may specify the exact message list by specifying
  38. Xthat message list on the command line and using a pipe:
  39. X.sp
  40. X.ti +2
  41. X10\-. | sort d
  42. X.sp
  43. XThis command means to sort the messages from 10 to the current message
  44. Xaccording to the date.
  45. X.sp
  46. XTo specify subsorting from with the curses interface, the temporary
  47. Xcurses escape key must be used (the colon `:') and the command issued
  48. Xat the `:' prompt (as if giving an \*Qex\*U command to \*Qvi\*U).
  49. XWhen the command is finished, the \*Q...continue...\*U prompt is given and
  50. Xthe user may continue or return to the top level of the curses mode.
  51. X.sp
  52. XIn the tool mode, subsorting can be specified only by typing message numbers
  53. Xin the \*QRange:\*U item at the top of the main frame, before selecting the
  54. X\*QSort\*U item.
  55. XThe sort range must consist of consecutive messages.
  56. XReversed sorting is not currently available in tool mode.
  57. X.sp
  58. XIf the variable
  59. X.I sort
  60. Xis set, messages are sorted each time the user's system mailbox is
  61. Xread as the current folder.
  62. XThe
  63. X.I sort
  64. Xvariable can be set either to nothing or to legal "sort" arguments.
  65. X.sp
  66. X\fINote\fR:  For compatibility with older versions, sort options are
  67. Xrecognized even if they are not preceded by a `\-'.
  68. XAlso, if a `\-' is given by itself (separated by spaces from any following
  69. Xarguments) it is interpreted as \-r.
  70. X.TP
  71. X.B stop
  72. XFor systems with job control, stop will cause
  73. X.I Mush
  74. Xto send a SIGTSTP to itself.
  75. XThe command was introduced to facilitate
  76. Xthe stop-job action from a complex command line alias rather than the user
  77. Xhaving to type his stop character explicitly.
  78. X.TP
  79. X.B top
  80. XTakes a message list and prints the top few lines of each.
  81. XThe number of lines printed is controlled by the variable
  82. X.B toplines
  83. Xand defaults to the size of the value of the variable
  84. X.B crt.
  85. XThis command is ignored in the tool mode.
  86. X.TP
  87. X.BR undigest " [-m] [-p pattern] [msg-list] [filename]"
  88. XA \*Qdigest\*U is a mail message which is a collection of other mail messages
  89. Xmailed to a \*Qmoderator\*U by other users.  The moderator compiles all the
  90. Xmessages into a folder and sends the result to all the subscribers of the
  91. Xmailing list.  The
  92. X.B undigest
  93. Xcommand disassembles the entries into the set of messages which comprises
  94. Xthe digest.
  95. X.sp
  96. XThe -m option will merge these messages into the current folder.  Otherwise,
  97. Xif a filename is specified, a new folder is created and the user can change
  98. Xfolders to read the messages separately.
  99. X.sp
  100. XThe -p option specifies an alternate pattern to be used as the digest
  101. Xarticle separator.
  102. XThis pattern must match literally at the beginning of the line.
  103. XThe default pattern is \*Q\-\|\-\|\-\|\-\|\-\|\-\|\-\|\-\*U (eight hyphens).
  104. XThis is the defacto USENET standard digest article separator and should
  105. Xwork for most digests, but some use another separator.
  106. XThe -p option is also useful for \*Qbursting\*U forwarded messages out
  107. Xof a wrapper message; for example:
  108. X.sp
  109. X.ti +4
  110. Xundigest -m -p "--- Forward"
  111. X.sp
  112. Xwill burst out messages forwarded by another user of
  113. X.I Mush
  114. Xand merge them into the current folder.
  115. X.sp
  116. XIf a message list is specified, each digest in the list is disassembled to
  117. Xthe same filename (if given).
  118. XIf no filename is given and the user did not request
  119. Xa merge, then a temporary file is made.
  120. X.TP
  121. X.BR update " [-r]"
  122. XUpdates your current folder, writing back changes just as if you
  123. X.BR quit.
  124. XHeaders are not listed when the folder is read back in.
  125. XThe \-r option puts the folder into read-only mode
  126. X.I after
  127. Xupdating it.
  128. X.sp
  129. XSee the
  130. X.BR folder
  131. Xcommand for complete information.
  132. X.sp
  133. X.SH VARIABLES
  134. XShell variables are controlled via the
  135. X.B set
  136. Xand
  137. X.B unset
  138. Xcommands.
  139. XOptions may be either boolean, in which case it is only
  140. Xsignificant to see whether or not they are set;
  141. Xstring, in which case the actual value is of interest;
  142. Xnumerical, in which case the numerical value is important;
  143. Xor multivalued, in which case they may be set to a list of values.
  144. XSome variables may have attributes
  145. Xof boolean and string or multivalued at the same time.
  146. X.PP
  147. XIf you or the program references a variable that is not explicitly set,
  148. Xthen the environment variables are checked and that data is returned.
  149. X.PP
  150. XVariable values can be modified by one of four variable modifiers, or by a
  151. Xnumeric string.
  152. XThe modifiers `:h', `:t', `:l' and `:u' may be applied to the variable names.
  153. XThe current implementation allows only one `:' modifier on each `$' expansion.
  154. X.TP
  155. X:t
  156. XThe variable is treated as a file path name, and the name of the file
  157. X(the \*Qtail\*U of the path) is substituted for the variable.
  158. XThat is, everything to the right of the last `/'
  159. Xis returned.
  160. X.TP
  161. X:h
  162. XThe variable is treated as a path name, and the \*Qhead\*U of the pathname
  163. Xis substituted for the variable.
  164. XThat is, everything up to, but not including, the last `/' is returned.
  165. X.TP
  166. X:l
  167. XAll alphabetic characters in the variable's value are converted to lower case.
  168. X.TP
  169. X:u
  170. XAll alphabetic characters in the variable's value are converted to upper case.
  171. X.TP
  172. X.RI : number
  173. XThe value of the variable is converted to a list of space-separated words,
  174. Xwhich are numbered from one (1), and the word described by
  175. X.I number
  176. Xis selected and returned.
  177. XIt is not an error for
  178. X.I number
  179. Xto be greater than the actual number of words; an empty string is returned
  180. Xin this case.
  181. X.PP
  182. XFollowing is a list of all variables with predefined meanings.
  183. X.TP
  184. X.B alwaysignore
  185. X(Boolean/Multivalued)
  186. XIf set with no value, the mail headers set by the
  187. X.B ignore
  188. Xcommand are always ignored.
  189. XNormally, ignored headers are not ignored when sending messages to
  190. Xthe printer, when interpolating messages into letters with ~f or ~I,
  191. Xwhen the `P' or `T' command is given (see the \fBprint\f command),
  192. Xor with the \-I flag to the
  193. X.B mail
  194. Xor
  195. X.B reply
  196. Xcommands.
  197. XSetting
  198. X.B alwaysignore
  199. Xwill ignore those headers even in the situations mentioned here.
  200. XNo headers can be ignored during updates and when using the
  201. X.B save
  202. Xcommand since the user may ignore headers that are required by
  203. X.I Mush
  204. Xor any other mail system to read those folders.
  205. X.sp
  206. XThis variable can also be set to a list of words
  207. Xseparated by commas or spaces.
  208. XCurrently recognized words, and their meanings, are:
  209. X.nf
  210. X.ta 1.5i
  211. X.in +4
  212. X.\" \& escapes are to make obvious the tab after each word
  213. Xforward\&    Ignore headers when forwarding messages (~f).
  214. Xinclude\&    Ignore headers when including messages (~I).
  215. Xpipe\&\&    The \fBpipe\fR command ignores headers.
  216. Xprinter\&    The \fBlpr\fR command ignores headers.
  217. X.in -4
  218. X.fi
  219. X.sp
  220. XAlso see the
  221. X.B ignore
  222. Xcommand and the
  223. X.B show_hdrs
  224. Xvariable for more information.
  225. X.TP
  226. X.B ask
  227. X(Boolean)
  228. XIf set, you will be prompted for a subject header for outgoing mail.
  229. XUse the tilde escape \*Q~s\*U to set the header once in the message
  230. Xor specify the \-s option on the
  231. X.B mail
  232. Xcommand line at the
  233. X.I Mush
  234. Xprompt.
  235. X.TP
  236. X.B askcc
  237. X(Boolean)
  238. XIf set, you will be prompted for a Cc (carbon copy) list when you are
  239. Xfinished editing a letter to be sent.
  240. XIf the variable
  241. X.B edit_hdrs
  242. Xis set, prompting will not occur, but a Cc: line will be added to the
  243. Xedit file.
  244. XThis also applies to the tool mode.
  245. X.TP
  246. X.B autodelete
  247. X(Boolean)
  248. XWhen exiting mail, all messages that have been read
  249. X.I "regardless of whether they have been marked for deletion"
  250. Xare removed.
  251. XOnly messages that haven't been read or that have been marked as
  252. X.B preserved
  253. Xare not removed.
  254. X.TP
  255. X.B autoedit
  256. X(Boolean)
  257. XIf set, you are automatically put into your editor whenever you
  258. Xsend or reply to mail.
  259. X.TP
  260. X.B autoinclude
  261. X(Boolean)
  262. XWhen replying to any mail, a copy of the message being replied to
  263. Xis automatically inserted into your message body indented by
  264. Xthe string described by the variable
  265. X.BR indent_str .
  266. X.TP
  267. X.B autoprint
  268. X(Boolean)
  269. XAfter you delete a message, the next message is printed automatically.
  270. X.TP
  271. X.B auto_route
  272. X(Boolean/String)
  273. XIf set boolean (not to a string), all the recipients in a message that
  274. Xis being replied to (via \fBreplyall\fR), will be routed through the path
  275. Xback to the original author.
  276. X.sp
  277. XFor example, if the original sender of a message came from the remote host
  278. X.B c3p0
  279. Xand the list of recipients looked like
  280. X.sp
  281. X.nf
  282. X.in +2
  283. XFrom: c3p0!user1
  284. XTo: yourhost!you
  285. XCc: r2d2!user2, r2d2!user3
  286. X.in -2
  287. X.fi
  288. X.sp
  289. Xthen clearly, \*Quser1\*U on the machine c3p0 can talk to your machine
  290. Xand the machine named r2d2.
  291. XHowever, you would not be able to respond to those users if your machine
  292. Xdid not exchange UUCP mail with the host r2d2.
  293. X.sp
  294. X.I Mush
  295. Xwill attempt to solve this problem by reconstructing the addresses
  296. Xfor \*Quser2\*U and \*Quser3\*U according to the address of the original
  297. Xsender, \*Qc3p0\*U.
  298. XThe new addresses for \*Quser2\*U and \*Quser3\*U should therefore become
  299. X.sp
  300. X.ti +2
  301. Xc3p0!r2d2!user2, c3p0!r2d2!user3.
  302. X.sp
  303. XIf your machine not only talks to c3p0,
  304. Xbut talks to r2d2 as well, it becomes unnecessary to route the mail
  305. Xthrough both c3p0 and r2d2.
  306. XSo, the variable
  307. X.B known_hosts
  308. Xmay be set to a list of hosts which you know your machine to have
  309. XUUCP mail connections with.
  310. XThis list is checked when constructing mail addresses for replies only and
  311. Xthe shortest path is made by removing from the UUCP path those hosts
  312. Xthat do not need to be called or are redundant.
  313. XSee the entry for
  314. X.B known_hosts
  315. Xfor more information.
  316. X.sp
  317. XIf
  318. X.B auto_route
  319. Xis set to a specific \fBpathname\fR (host names separated by !'s),
  320. Xall addresses in the reply will have this route prepended to their addresses.
  321. XThis ignores the original path of the author.  This is quite useful for
  322. Xhosts which talk uucp to a node which is connected to the internet or uunet
  323. Xsince both of those machines tend to be one-hop away from all other hosts
  324. X(or reroute accordingly).  For example, if a message was addressed like so:
  325. X.sp
  326. X.in +2
  327. X.nf
  328. XTo: root@ucbvax.berkeley.edu, argv@zipcode.uucp
  329. XCc: ucbcad!foo!bar
  330. X.sp
  331. X.fi
  332. X.in -2
  333. XIf auto_route were set to "ucbcad", then replies to this address would be
  334. Xdirected addressed like so:
  335. X.sp
  336. X.in +2
  337. X.nf
  338. XTo: ucbcad!ucbvax.berkeley.edu!root, ucbcad!zipcode.uucp!argv
  339. XCc: ucbcad!foo!bar
  340. X.sp
  341. X.fi
  342. X.in -2
  343. X.sp
  344. XThis assumes that the host in question talks uucp with ucbcad.  This example
  345. Xdemonstrates several things.  First, notice that all addresses are converted
  346. Xto uucp-style format.  Whenever routing is changed, the format is converted
  347. Xlike this.  Secondly, note that the Cc: line did not change.  This is because
  348. Xall redundant hostnames from UUCP pathnames are removed
  349. Xto avoid unnecessary UUCP connections and speed up mail delivery.
  350. X.sp
  351. XAnother example of how auto_route truncates UUCP paths:
  352. X.sp
  353. X.ti +2
  354. Xpixar!island!sun!island!argv
  355. X.sp
  356. XHere, mail was probably originally sent to users at pixar and sun from
  357. Xsomewhere undetermined now.
  358. XSince sun and pixar do not talk to each other, the users on those machines may
  359. Xhave responded to mail creating the type of addresses stated above.
  360. XHere, it can be seen that we can reduce the path to the host
  361. X.IR island :
  362. X.sp
  363. X.ti +2
  364. Xpixar!island!argv
  365. X.sp
  366. XSee the MAIL ADDRESSES section for more detailed information
  367. Xabout legal mail addresses.
  368. X.sp
  369. XNote that the -r flag to \fBreply\fR and \fRreplyall\fR overrides the
  370. Xvalue of \fBauto_route\fR.
  371. X.TP
  372. X.B autosign
  373. X(Boolean/string)
  374. XAppend a signature to outgoing mail.
  375. XIf this variable is set, but not to a string (e.g., boolean-true)
  376. Xthen the file ~/.signature is used.
  377. X.sp
  378. XOtherwise, the variable is interpreted in one of four ways.
  379. XBy default, the string is interpreted as a pathname relative to the
  380. X.I current
  381. Xdirectory.
  382. XFor this reason, it is advisable to use full pathnames here.
  383. XAs usual, the special characters `~' and `+' are expanded.
  384. XIf a file is found, it is opened and its contents are read into the
  385. Xmessage buffer.
  386. X.sp
  387. XIf the variable is set to a string that begins with `$', then that string
  388. Xis interpreted as a user-definable variable and is expanded and appended
  389. Xto the letter.
  390. X.sp
  391. XIf the variable is set to a string that begins with a backslash (\\)
  392. Xthen the string itself (minus the `\\' character) is used; no expansion
  393. Xis done and no files are read.
  394. X.sp
  395. XFinally, if the variable is set to a string that begins with a vertical
  396. Xbar (or \*Qpipe\*U) character (|), the rest of the string is interpreted
  397. Xas a command whose output will be used as the signature.
  398. XThe special characters `~' and `+' are NOT expanded in the command name,
  399. Xbut the command is run via /bin/sh so $PATH will be searched and redirection
  400. Xcan be specified.
  401. XThe list of addresses to which the letter will be sent is passed to
  402. Xthe command as its arguments, in the same form that they will be passed
  403. Xto the Mail Transport Agent (MTA).
  404. XDepending on your MTA, each address may be followed by a comma.
  405. X.sp
  406. XIn the latter three cases, it is advisable to set the variable using single
  407. Xquotes to protect the `$', `\\' and `|' characters from being interpreted.
  408. XExamples:
  409. X.sp
  410. X.nf
  411. X.ti +2
  412. Xset autosign = '$foo'
  413. X.ti +2
  414. Xset autosign = '\\  Dan Heller zipcode!argv@ucbcad.berkeley.edu'
  415. X.\" Need a pipe example?
  416. X.fi
  417. X.sp
  418. X.BR Warning :
  419. Xif redirection from the calling shell is used,
  420. Xno signature or fortune will be added to outgoing mail.
  421. XFor example,
  422. X.sp
  423. X.ti +2
  424. X% mush \-s report manager < report_file
  425. X.sp
  426. XIn this command, mail is being sent to the user \*Qmanager\*U and the
  427. Xsubject is set to \*Qreport\*U and the file \*Qreport_file\*U is being
  428. Xredirected as input.
  429. XIn this case, there will be \fIno\fR signature appended.
  430. X.sp
  431. X.IR Note :
  432. XThe `|' syntax for calling a program to sign the letter is a little
  433. Xcounterintuitive and may change in future releases.
  434. X.TP
  435. X.B autosign2
  436. X(String)
  437. XThis alternate signature is available for special cases where the default
  438. Xsignature is not desired or if no signature is desired for special addresses
  439. Xor if only special addresses require a signature.
  440. XThe format for this variable is:
  441. X.sp
  442. X.ti +2
  443. Xautosign2 = \*Qaddress1, address2, ... : <signature>\*U
  444. X.sp
  445. XEach address can be one of these types:
  446. X.RS
  447. X.TP
  448. X1)  address
  449. XLegal mailing addresses that do not contain comment
  450. Xfields (see the sections MAIL ADDRESSES for more information on legitimate
  451. Xmail addresses) will match literally.
  452. X.TP
  453. X2)  *username
  454. XIf the username is present on the recipient list, regardless of what
  455. Xremote site the user may reside on (including locally), the pattern matches.
  456. X.TP
  457. X3)  !hostname !host1!host2...
  458. XAny user who appears as a recipient will match the pattern provided he
  459. Xresides on the specified hostname.
  460. XIf a path of hosts is specified, then the user must reside on the last
  461. Xhost of the specified path.
  462. X.\" Nroff note: there is a problem with the @sub.domain line.  Why?
  463. X.\" The .br is intended to deal with this.
  464. X.TP
  465. X4)  @sub.domain
  466. X.br
  467. XThe user must reside on any host within the domain specified.
  468. XNeither the user or the hostname needs to match; only the domain name must
  469. Xbe required to match.
  470. X.RE
  471. X.\" Nroff note: RE takes us all the way out of TP, so step back in again.
  472. X.RS
  473. X.sp
  474. XExample:
  475. X.sp
  476. X.nf
  477. X.ti +2
  478. Xset autosign2 = \*Q!zipcode @sun.com @mit.edu *schaefer root: \--dan\*U
  479. X.fi
  480. X.sp
  481. XThis means that any mail sent to 1) anyone at zipcode, 2) anyone within
  482. Xthe sun domain, 3) anyone within the mit domain, 4) Bart Schaefer
  483. X(at any host anywhere -- even locally),
  484. Xand 4) root on the local machine only (or, root@local-machine-name)
  485. Xwill be signed with the \*Qalternate\*U signature.
  486. XIf any address on the
  487. Xrecipient list fails to satisfy these four matches, the mail will be
  488. Xsigned by my regular signature.
  489. X.sp
  490. XOne can have a local signature and a remote signature by specifying
  491. Xthe autosign2 to include the hostname of the home machine the user
  492. Xis logged into.  Note the \*Qzipcode\*U example above.
  493. X.sp
  494. XThe list of recipients, after alias expansion and comment removal, is
  495. Xthen scanned and the following patterns are matched against those addresses
  496. Xspecified in the autosign2 or fortunates variable according to these rules.
  497. X.sp
  498. XThe signature description is the same as described by
  499. X.B autosign
  500. Xvariable.  The colon (:) separates the list of addresses from the signature
  501. Xdescription.  If there is no colon or the address list is missing, the
  502. Xentire string is considered the signature (except for the colon).
  503. X.sp
  504. XIf
  505. X.B autosign
  506. Xis not set, then autosign2 will ONLY work if the tilde command \*Q~S\*U
  507. Xis specified.  In this way, a user may never have autosign set and just
  508. Xset autosign2 to be some signature value.  The user may then issue the
  509. Xtilde command to automatically sign the letter.
  510. XIf a list of addresses is given (terminated by a colon), then all
  511. Xrecipients of the message must be in the list of addresses in autosign2;
  512. Xotherwise, the signature in \fBautosign\fR (if set) is used instead.
  513. XA null signature in autosign2 will not sign the letter.
  514. X.sp
  515. XExample:
  516. X.sp
  517. X.nf
  518. X.ti +2
  519. Xset autosign2 = "fred, barney, wilma, betty: ~/flintstone.sig"
  520. X.fi
  521. X.sp
  522. XIf a message is sent to:
  523. X.sp
  524. X.ti +2
  525. XTo: fred, wilma
  526. X.sp
  527. XThen the file ~/flintstone.sig will be used.
  528. XHowever, if the address were:
  529. X.sp
  530. X.ti +2
  531. XTo: barney, betty, bambam
  532. X.sp
  533. XThen autosign2 will not be used because bambam is not in the list.
  534. X.sp
  535. XNote that mail sent via redirection from the calling shell will not
  536. Xsign letters or append fortunes.
  537. X.RE
  538. X.TP
  539. X.B cdpath
  540. X(String)
  541. XSet to a string of pathnames separated by spaces to use when searching
  542. Xfor a directory when the
  543. X.B cd
  544. Xcommand is issued.
  545. XIf this variable is used, it is recommended that the path `.' be included.
  546. XNote that this differs from the
  547. X.IR csh ,
  548. Xwhich does not require that `.' be present.
  549. X.TP
  550. X.B cmd_help
  551. X(String)
  552. XThis variable gives the path name of the general help file, which is read
  553. Xby the
  554. X.B help
  555. Xcommand.
  556. XThis variable is normally reset only in the system initialization files,
  557. Xwhen the default location of the help file has changed.
  558. X.TP
  559. X.B complete
  560. X(String)
  561. XSetting this variable enables word completion.
  562. XThe first character of the value of
  563. X.B complete
  564. Xis used as the
  565. X.IR "completion character" ;
  566. Xif
  567. X.B complete
  568. Xis set, but not to a value, the escape character is used as the default.
  569. XWhen the completion character is typed at the end of a word prefix,
  570. X.I Mush
  571. Xwill interactively complete that word.
  572. XIf the prefix is not unique, the word will be completed as far as possible
  573. Xand a bell will sound (see, however, the variable
  574. X.BR quiet ).
  575. XIf the word contains filename metacharacters,
  576. X.IR "all possible matches will be completed" .
  577. XIf the list overflows the command line buffer, it will be truncated, so
  578. Xthis feature should be used with care.
  579. XMetacharacters recognized are the same as in
  580. X.IR csh .
  581. X.sp
  582. XThe second character of the value of
  583. X.B complete
  584. Xis used as the completion listing character.
  585. XWhen this character is typed, the possible completions will be printed, and
  586. X.I Mush
  587. Xwill prompt again with the original prefix.
  588. XIf
  589. X.B complete
  590. Xis set to only a single character, completion listing is disabled;
  591. Xif it is set with no value, control-D (^D) is used as the default
  592. Xlisting character.
  593. X.sp
  594. XSee the description of the variable
  595. X.B fignore
  596. Xfor ways to exclude filenames from completions.
  597. X.sp
  598. XWord completion is currently supported only for file names.
  599. XCommand name and alias completion may be added in a future version.
  600. XCompletion is not possible if the \-e (\-echo) flag was given, and
  601. Xis currently not available in tool mode.
  602. X.TP
  603. X.B crt
  604. X(Numeric)
  605. XSet to a value that describes the number of lines a message
  606. Xmust have before invoking the
  607. X.B pager
  608. Xto view a message.
  609. X.TP
  610. X.B crt_win
  611. X(Numeric)
  612. XSet to the height (in lines) of the message display window in tool mode.
  613. X.TP
  614. X.B curses_help
  615. X(String)
  616. XThis variable may be set to a space-separated list of curses mode command
  617. Xnames (see the CURSES section for the possible choices).
  618. XIf set but without a value, a default list established by your
  619. X.I Mush
  620. Xmaintainer is used.
  621. XWhen it is set, a display of the current bindings for the listed commands
  622. Xwill appear at the bottom of the screen in curses mode.
  623. XThis help display will normally shorten the display of headers, but the
  624. Xthe user may explicitly scroll over the help display if he wishes to see
  625. Xmore headers.
  626. X.TP
  627. X.B cwd
  628. X(String)
  629. XThe
  630. X.B "current working directory"
  631. Xstring is automatically set upon startup of
  632. X.I Mush
  633. Xand is reset each time the commands
  634. X.B cd
  635. Xand
  636. X.B pwd
  637. Xare called.
  638. XIt may be changed or referenced like any other shell variable.
  639. X.TP
  640. X.B date_received
  641. X(Boolean)
  642. XWhen message headers are printed, the date is normally shown is
  643. Xthe time and date the sender sent the message.  If this variable
  644. Xis set, then the date displayed is the date received.
  645. X.sp
  646. XWhen sorting messages by date, this variable is queried to determine
  647. Xwhether the messages should be sorted by date sent or date received.
  648. X.sp
  649. X\fBWarning:\fR For mailers that store messages \fIwithout\fR a line
  650. Xthat starts with \*QFrom \*U, this option does nothing.
  651. X.TP
  652. X.B dead
  653. X(String)
  654. XFile to use instead of dead.letter when interrupted mail is saved.
  655. XMay be set to a \fIunix\fR command by prefixing the value with `|'.
  656. XFor more information, see the variable
  657. X.B nosave.
  658. X.TP
  659. X.B domain_route
  660. X(Boolean/String)
  661. XIn combination with
  662. X.BR auto_route ,
  663. Xthis variable specifies that addresses containing a fully-qualified domain
  664. Xshould be short-circuited to mail directly to the rightmost fully-qualified
  665. Xdomain.
  666. XIf set boolean (not to a string), only short-circuiting is done.
  667. XIf set to a string, the address is rewritten to UUCP form and the value
  668. Xof the variable is prepended.
  669. XDomain short-circuiting applies \fIonly\fR to addresses containing a
  670. Xfully-qualified domain, but short-circuits in spite of any path specified
  671. Xwith the \-r flag of
  672. X.B reply
  673. Xor through the string value of
  674. X.B auto_route
  675. X(thus possibly omitting the auto_route or \-r paths altogether).
  676. XSee
  677. X.B auto_route
  678. Xfor more information.
  679. X.TP
  680. X.B dot
  681. X(Boolean)
  682. XCauses
  683. X.I Mush
  684. Xto accept a `.' on a line by itself,
  685. Xin addition to `^D', to terminate messages.
  686. X.TP
  687. X.B editor
  688. X(String)
  689. XSpecifies the editor to use when the \*Q~e\*U escape or the
  690. X.B edit
  691. Xcommand is used.
  692. XDefault is the value of the environment string EDITOR or the variable
  693. X.BR visual .
  694. X.TP
  695. X.B edit_hdrs
  696. X(Boolean)
  697. XWhen in letter-composition mode (via \fBmail\fR or \fBreply\fR, etc),
  698. Xthe headers of the outgoing message are stored in the same buffer as
  699. Xthe text of the letter.
  700. XSo, if the editor is called to edit the message
  701. Xbuffer, the headers of the message can be edited as well.
  702. XHowever, there are some restrictions.
  703. X.sp
  704. XThere must be a To: header.
  705. XWithout this, 
  706. X.I Mush
  707. Xwill not deliver the letter.
  708. XInstead, the editor must be reentered and a To: header with
  709. Xa valid recipient must be inserted.
  710. XA valid Cc: header does not remove this restriction.
  711. XYou may have as many To: and Cc: headers as you like.
  712. X.sp
  713. XThe From: header normally should not be changed.
  714. XIf you change this header to an address that
  715. X.I Mush
  716. Xis unable to identify as
  717. Xauthentic, the original From: header will silently be put back.
  718. X.sp
  719. XThe Date: header will always be replaced by one with a more accurate
  720. Xtime and date stamp.
  721. XTherefore, changing or removing this header has no effect.
  722. X.sp
  723. XYou cannot add a Status: header, and blank headers are dropped.
  724. XFor example, if an empty Cc: header exists, the header will
  725. Xnot show up in the outgoing message.
  726. XTherefore, leaving empty headers has no effect.
  727. X.sp
  728. XAliases specified on the command line are expanded and put into the
  729. Xmessage buffer in their expanded form regardless of the value of
  730. X.B no_expand.
  731. XHowever, if the user changes the headers using the editor and specifies
  732. Xaliases, those aliases will not be expanded if
  733. X.B no_expand
  734. Xis set.
  735. XOtherwise, they are expanded as usual.
  736. X.sp
  737. XThe headers Bcc: and Fcc: are removed as expected.
  738. X.sp
  739. XOne added side effect of
  740. X.B edit_hdrs
  741. Xis that you can add an Fcc: header to specify a \*QFile Carbon Copy\*U.
  742. XThis must be a pathname to a file or program.
  743. XFor programs, the pathname must be preceded by a pipe character (|).
  744. XNote that \fIall\fR addresses on the Fcc: line that do not begin with `|'
  745. Xare interpreted as file names; don't put other kinds of addresses there.
  746. X.sp
  747. XWhen using
  748. X.B edit_hdrs,
  749. Xcertain tilde escapes don't work.
  750. XSpecifically, any tilde escape that allows you to add or set headers or to
  751. Xempty the file are inactive.
  752. XThese functions are to be done in the editor only.
  753. X.sp
  754. XOnce a letter is being edited,
  755. X.B edit_hdrs
  756. Xcannot be set or unset; the user must end the letter (either
  757. Xby sending it or forcefully terminating it) first.
  758. X.sp
  759. XHeader editing is required (and happens automatically) when using the
  760. X\*QCompose\*U tool mode item.
  761. X.TP
  762. X.B escape
  763. X(Character)
  764. XWhen composing a mail message (not in an editor), and the
  765. X.B escape
  766. Xcharacter is the first character on the line, the next character
  767. Xis examined and a corresponding function associated with that
  768. X.I "escape command"
  769. Xis executed.
  770. XSee
  771. X.B "tilde escapes"
  772. Xfor more information.
  773. X.TP
  774. X.B fignore
  775. X(String)
  776. XThis variable is tested when filename completion is used (see the variable
  777. X.B complete
  778. Xfor details).
  779. XThe value of
  780. X.B fignore
  781. Xmay be a list of filename extensions (\*Q.c\*U, \*Q.o\*Q, etc.), a list
  782. Xof filename patterns containing metacharacters (*?{}[]), or a mixture of
  783. Xthe two.
  784. XEach element in the list must be separated from the others by a space.
  785. XWhen a filename completion occurs, any filenames with the extensions
  786. Xlisted in
  787. X.BR fignore ,
  788. Xor matching the patterns given there, will be omitted from the completion.
  789. X.sp
  790. XFor example,
  791. X.sp
  792. X.ti +4
  793. Xset fignore = ".o .s [Mm]ake*"
  794. X.sp
  795. Xwill cause any filename ending in \*Q.o\*U or \*Q.s\*U, and any filename
  796. Xbeginning with \*QMake\*U or \*Qmake\*U, to be excluded from completions.
  797. X.sp
  798. XIf all files in the current directory match the extensions or patterns,
  799. X.B fignore
  800. Xis disabled and completion will occur.
  801. XFor this reason, it is usually not a good idea to include \*Q*\*U in the list.
  802. X.TP
  803. X.B folder
  804. X(String)
  805. XThe folder variable is set to the path of a directory where folders are kept.
  806. XThis path is used by various commands to expand the `+' metacharacter (see
  807. Xthe
  808. X.B folder
  809. Xcommand for details).
  810. X\*Q~/Mail\*U is the default expansion of `+'.
  811. X.TP
  812. X.B fortune
  813. X(Boolean/string)
  814. XIf fortune is set, a random fortune is appended to the end of
  815. Xall outgoing mail using the
  816. X.IR UNIX (TM)
  817. Xcommand
  818. X.B /usr/games/fortune
  819. X(may vary from system to system).
  820. XIf fortune is set to something that starts with
  821. Xa `\-', then it is interpreted as a flag to fortune (e.g., \*Q\-o\*U).
  822. XIf
  823. X.B fortune
  824. Xstarts with a `/', then the program described by
  825. Xthe string is executed (thus not doing fortune at all, if you want).
  826. XBy default,
  827. X.I "fortune \-s"
  828. X(short fortunes) is used.
  829. X.TP
  830. X.B fortunates
  831. X(String)
  832. XWhen fortunes are added to messages, sometimes it is desirable to
  833. Xmake sure that only a selected group of people get a fortune since
  834. Xcertain people may not understand the messages at the end of your
  835. Xmail.  Therefore, you can set a list of addresses (either pure addresses
  836. Xor aliases that are expanded to addresses) to be the only people who
  837. Xreceive fortunes if one is to be appended.  Therefore,
  838. Xif the To: and Cc: lines contain only address listed in this string
  839. Xvariable, then a fortune is appended to the message.
  840. XIf those lists contain names that are not on the fortunates
  841. Xlist, then no fortune is added.
  842. XThis cannot be overridden; using the
  843. Xtilde command \*Q~F\*U does not force a fortune to be added unless the
  844. Xindividuals on the recipient list are all included in the fortunates
  845. Xlist.  The list is made up of addresses or aliases separated by spaces or
  846. Xcommas.
  847. X.I "NOTE: fortune must be set in order for fortunates to work."
  848. X.TP
  849. X.B hangup
  850. X(Boolean)
  851. XIf this variable is set,
  852. X.I Mush
  853. Xwill update your folder before exiting when it receives a SIGHUP signal.
  854. XThis is useful if you frequently read mail when dialed in over a noisy phone
  855. Xline that often drops carrier.
  856. X.sp
  857. X.IR WARNING \|:
  858. XCertain errors are ignored during this update, because it is presumed to be
  859. Ximpossible to query the user for instructions.
  860. XExcept in the event of a write error, the folder will be forced to contain
  861. Xexactly those messages that were not deleted at the time of the hangup.
  862. XIn particular, this means that if an error occurs when loading new mail before
  863. Xthe update, the new mail will be lost.
  864. XWrite errors will still cause both the working tempfile and as much of the
  865. Xfolder as possible to be preserved.
  866. X.TP
  867. X.B hdr_format
  868. X(String)
  869. XThis variable controls the format of the headers displayed by the
  870. X.B headers
  871. Xcommand and in the curses and tool modes.
  872. XThe format style of this variable string is similar to printf in C.
  873. XWhen printing the information, the variable is evaluated and each
  874. Xcharacter in the string is echoed unless a `%' character is
  875. Xencountered.
  876. XIf one is found, the following string substitutions are made:
  877. X.sp
  878. X.in +2
  879. X.nf
  880. X.ta 0.5i
  881. X%a    address of the author
  882. X%c    number of characters (bytes) in the message
  883. X%f    entire \*QFrom:\*U field (author)
  884. X%l    number of lines in the message
  885. X%i    the message-id (may not be present)
  886. X%n    name of the author
  887. X%s    subject of the message
  888. X%t    \*QTo:\*U field (recipients)
  889. X%d    date and time of the message
  890. X%T    time only of the message
  891. X%N    day number of the month of the message
  892. X%W    day of the week (Sun, Mon, etc.)
  893. X%M    month name of the message
  894. X%Y    year of the message
  895. X%y    last two digits of %Y
  896. X%Z    time zone of the message
  897. X\\n    a newline
  898. X\\t    a tab
  899. X.fi
  900. X.in -2
  901. X.sp
  902. XA field width specifier may be used in all options.
  903. XThus, \*Q%20f\*U will print the
  904. Xfirst 20 characters of the from line.
  905. XNo matter what the formatting string, the message number
  906. Xfollowed by a `>' (for current message) is printed.
  907. X.sp
  908. XThe \*Qaddress\*U and \*Qname\*U of the author
  909. Xare extracted from the \*QFrom:\*U field of the message.
  910. XThe name may be given in parentheses and
  911. Xthe rest of the line is the address, or the address is given in angle
  912. Xbrackets (`<' and `>') and the rest of the line is the name.
  913. XSometimes the address is the only thing on the line,
  914. Xin which case the name and address are the same.
  915. X.sp
  916. XA special format is also provided to obtain the contents of any header
  917. Xnot listed above.
  918. XIf a format of the form \*Q%?header-name?\*U (both leading and following `?'
  919. Xcharacters are required) appears in the value of 
  920. X.BR hdr_format ,
  921. Xthe named header will be looked up.
  922. XFor example,
  923. X.sp
  924. X.ti +4
  925. Xset hdr_format = "%a %n %?phone?"
  926. X.sp
  927. Xcauses the electronic address, name, and (if a \*QPhone:\*U header is present)
  928. Xphone number of the sender to be displayed.
  929. X.TP
  930. X.B history
  931. X(Numeric)
  932. XThis variable is set to the number of commands the shell interface
  933. Xwill remember.  It is just like the history variable used in
  934. X.I csh.
  935. XIf unset, the last command can always be referenced, but none other.
  936. X.TP
  937. X.B hold
  938. X(Boolean)
  939. XNormally, on termination of mail, read messages are saved in
  940. Xyour mbox (except those marked as preserved).
  941. XSetting
  942. X.B hold
  943. Xprevents this from happening,
  944. Xand messages remain in /usr/spool/mail/user.
  945. XThis does not apply to folders, obviously.
  946. X.TP
  947. X.B home
  948. X(String)
  949. XThis variable describes the user's home directory.
  950. XThe variable is initialized to the value of the environment variable HOME,
  951. Xbut can be modified at any time during the
  952. X.I Mush
  953. Xsession.
  954. XThe home directory is the same directory where temporary
  955. Xfiles are kept for editing and so forth.
  956. XIf the home directory cannot be found or read/write access is denied, an
  957. Xalternate directory, typically /tmp, is used.
  958. X.TP
  959. X.B hostname
  960. X(String)
  961. XThis is the name of your computer.  Currently, its sole usage is to
  962. Xcompose a correct \*QFrom:\*U line for use with Mail Transport Agents
  963. Xthat do not create this header automatically.  This will aid the
  964. Xrecipients of your mail in replying to your messages.
  965. X.sp
  966. XNote: the user should not have to set
  967. Xthis variable since it should be set automatically by the system.  However,
  968. Xit may happen that the system's hostname cannot be queried and the user may
  969. Xhave to set this variable manually.
  970. X.TP
  971. X.B ignore_bang
  972. X(Boolean)
  973. XIf set,
  974. X.I Mush
  975. Xwill ignore the `!' character as a history reference.
  976. XNote that this severely limits use of the
  977. X.B cmd
  978. Xfacility, which depends upon history references for argument substitutions.
  979. X.TP
  980. X.B ignoreeof
  981. X(Boolean/string)
  982. XIf set, `^D' will not exit from
  983. X.IR Mush .
  984. XIf set to a string, that string is executed as a command
  985. Xwhen `^D' is typed.
  986. XThis does not effect termination of messages under the
  987. X.B mail
  988. Xand
  989. X.B reply
  990. Xcommands.
  991. X.TP
  992. X.B indent_str
  993. X(String)
  994. XWhen including messages into the text of a letter you are editing,
  995. Xeach line of the messages is preceded by the value of
  996. X.BR indent_str .
  997. XIf it is unset, the message body is indented by the string \*Q> \*U.
  998. XSee also the variables
  999. X.B pre_indent_str
  1000. Xand
  1001. X.BR post_indent_str .
  1002. X.TP
  1003. X.B in_reply_to
  1004. X(String)
  1005. XThis variable may be set to a string that will complete the
  1006. Xheader \*QIn-Reply-To:\*U.
  1007. XThe format of this string is identical to the options for the variable
  1008. X.BR hdr_format .
  1009. X.sp
  1010. XFor example, if the user were to respond to a message
  1011. Xfrom Dan Heller that was sent on October 21, 1987, at 10:39pm, with
  1012. X.B in_reply_to
  1013. Xset to the string
  1014. X.nf
  1015. X.in +2
  1016. X.sp
  1017. X%n's message as of %d.
  1018. X.sp
  1019. X.ti -2
  1020. Xthe header line
  1021. X.sp
  1022. XIn-Reply-To: Dan Heller's message as of Oct 21, 1987, 10:39pm.
  1023. X.in-2
  1024. X.fi
  1025. X.sp
  1026. Xwould be added to the message.
  1027. X.TP
  1028. X.B keepsave
  1029. X(Boolean)
  1030. XIf set, the commands
  1031. X.B save
  1032. Xand
  1033. X.B write
  1034. Xwill
  1035. X.I not
  1036. Xmark messages for deletion.
  1037. X.TP
  1038. X.B known_hosts
  1039. X(String)
  1040. XUsed in conjunction with the variable
  1041. X.BR auto_route ,
  1042. Xthis variable is set to a list of hosts, separated by spaces, tabs,
  1043. Xand/or commas, and describes
  1044. Xthe hosts with whom you know your machine shares UUCP connections.
  1045. XWhen replying to mail, many times you will see that the return path
  1046. Xconstructed will have hostnames that your site could call, but instead
  1047. Xthe mail has been routed through a number of different machines first.
  1048. X.sp
  1049. XFor example, if you respond to mail that would mail to the path
  1050. X.sp
  1051. X.ti +2
  1052. Xunicom!pixar!root
  1053. X.sp
  1054. Xbut your know your machine already calls pixar, then sending the mail
  1055. Xto unicom first is unnecessary.
  1056. XIf you have set your known_hosts string to include pixar in its list,
  1057. Xthe resulting address would look like
  1058. X.sp
  1059. X.ti +2
  1060. Xpixar!root
  1061. X.sp
  1062. XAlso see the command
  1063. X.B replyall
  1064. Xfor more information on constructing correct return addresses.
  1065. X.TP
  1066. X.B logfile
  1067. X(String)
  1068. XSet to a filename which logs the headers of outgoing messages.  The message
  1069. Xbody of the message is not logged as it is for the
  1070. X.B record
  1071. Xfilename.  The logfile can be read as a folder to scan for the fact that
  1072. Xmessages have been sent.  If \fBlogfile\fR and \fBrecord\fR are both set,
  1073. Xthen the logfile and the record files will match exactly.  In this case,
  1074. Xthe record file can be quickly scanned by scanning the log file instead.
  1075. X.sp
  1076. XIf set, but not to a string, the log file defaults to ~/mail.log.
  1077. X.TP
  1078. X.B mail_icon
  1079. X(String)
  1080. XSet to a pathname for an alternate icon pixmap to use when the
  1081. X.I Mush
  1082. Xtool is closed.
  1083. XThe number of messages in the mailbox is displayed as an icon label unless
  1084. Xthe string
  1085. X.I iconlabel
  1086. Xappears as one of the values of the variable
  1087. X.BR quiet .
  1088. XSee also the variable
  1089. X.B newmail_icon
  1090. Xfor the icon displayed when new mail arrives or is present.
  1091. X.TP
  1092. X.B mbox
  1093. X(String)
  1094. XSet to the pathname of a file you'd like 
  1095. X.I Mush
  1096. Xto use as the default folder for read mail.
  1097. XThe default is ~/mbox.
  1098. X.TP
  1099. X.B metoo
  1100. X(Boolean)
  1101. XWhen replying to mail, you are normally deleted from the list of
  1102. Xrecipients.
  1103. XIf metoo is set, you remain on the list.
  1104. XSee the 
  1105. X.B alternates
  1106. Xcommand
  1107. Xfor information on determining whether or not you're even on the list.
  1108. X.TP
  1109. X.B mil_time
  1110. X(Boolean)
  1111. XWhenever the time is displayed in a message header or in the prompt,
  1112. Xit can be displayed in either 12-hour am/pm format, or in 24 hour
  1113. Xmilitary time format.
  1114. XThe default is the 12 hour format, but can be
  1115. Xreset to use the 24 hour format by setting this variable.
  1116. X.TP
  1117. X.B newline
  1118. X(Boolean/string)
  1119. XIf set, carriage returns are ignored.
  1120. XIf set to a string, that string is executed as a command when a
  1121. Xcarriage return is typed.
  1122. XOtherwise, carriage return prints the next undeleted message.
  1123. X.B newmail_icon
  1124. X(String)
  1125. XSet to a pathname for an alternate icon pixmap to use
  1126. Xwhen new mail is available.
  1127. X.TP
  1128. X.B no_expand
  1129. X(Boolean)
  1130. XWhen a
  1131. X.I Mush
  1132. Xalias is used to reference a list of addresses, the list is expanded on
  1133. Xthe To: and Cc: lines to indicate the complete list of all the recipients of
  1134. Xthe message.
  1135. XWhen no_expand is set, aliases are not expanded and the headers
  1136. Xreflect the same information as typed by the user.
  1137. X.TP
  1138. X.B no_hdrs
  1139. X(Boolean)
  1140. XIf set, this variable tells 
  1141. X.I Mush
  1142. Xnot to include your personalized mail headers in messages.
  1143. XThis does not unset your headers, it just disables them.
  1144. X.TP
  1145. X.B no_reverse
  1146. X(Boolean)
  1147. XIn curses mode and in the tool mode, reverse video is not used to indicate the 
  1148. X.I "current message"
  1149. Xif this variable is set.
  1150. XIn the tool mode, if reverse video is not in use,
  1151. Xtext is displayed in \*Qbold\*U.
  1152. X.TP
  1153. X.B nonobang
  1154. X(Boolean)
  1155. XIf this variable is set, history references that don't match anything will
  1156. Xbe left unexpanded, rather than generating error messages.
  1157. XThis is useful if you want argument referencing in
  1158. X.B cmd
  1159. Xexpansions, but do
  1160. Xnot want to remember to escape every `!' you type in UUCP addresses.
  1161. XIt is also recommended for use with curses mode, because history is not
  1162. Xkept for line mode escapes from that interface.
  1163. X.TP
  1164. X.B nosave
  1165. X(Boolean)
  1166. XWhen composing a letter, the user can terminate the letter without sending
  1167. Xit by using the tilde escape \*Q~q\*U or by sending two \*Qinterrupt\*U
  1168. Xsignals.
  1169. XWhen the message is terminated, a copy of it is saved to the
  1170. Xfile \*Qdead.letter\*U in the user's home directory or to the file described
  1171. Xby the variable
  1172. X.BR dead .
  1173. XIf the variable
  1174. X.B nosave
  1175. Xis set, then a backup copy of the message will not be saved.
  1176. X.TP
  1177. X.B output
  1178. X(Read-only string)
  1179. XThis variable holds a message list representing the output of the last
  1180. Xsuccessful command.
  1181. XThis is useful for recovering from broken pipes or to capture the output
  1182. Xof a command without affecting the information it displays (some commands
  1183. Xlimit or suppress output when used in a pipeline).
  1184. XCommands which return an error status (see the variable
  1185. X.BR status )
  1186. Xdo not affect the value of
  1187. X.BR output ,
  1188. Xbut successful commands that return no message list will clear it.
  1189. XAlso, many curses mode commands return an error status to indicate that
  1190. Xthe display has been altered, even if no actual error occurred.
  1191. XThis variable is thus most useful in line mode and in scripts.
  1192. X.TP
  1193. X.B pager
  1194. X(String)
  1195. XIf a message is longer than the number of lines that the variable
  1196. X.B crt
  1197. Xis set to, then this program is executed to view a message.
  1198. XIf the user does not have this variable set, the user's environment PAGER
  1199. Xis checked.
  1200. XIf this isn't set, then the default value for pager (set up
  1201. Xby the system manager) is used.
  1202. XThis may or may not be the internal pager.
  1203. XTo use the internal pager, you may set the variable pager to
  1204. X.I internal
  1205. Xor to a null string.
  1206. X.TP
  1207. X.B pre_indent_str
  1208. X(String)
  1209. XIf this variable is set, when including the body of a message into an outgoing
  1210. Xmail message (using the \-i option to
  1211. X.I reply
  1212. Xor
  1213. X.IR mail ,
  1214. Xor when using the \*Q~i\*U escape),
  1215. Xa line preceding the first line of
  1216. Xincluded text is printed using the string value of the variable.
  1217. XThis string uses the same printf style formatting characters as the
  1218. X.B hdr_format
  1219. Xvariable.
  1220. XFor example, you could set
  1221. X.B pre_indent_str
  1222. Xas follows:
  1223. X.sp
  1224. X.ti +2
  1225. Xset pre_indent_str = '[In the message entitled "%s", on %7d\\n %n writes:]'
  1226. X.sp
  1227. XYou can then include a message body using \*Q~i\*U, and you might
  1228. Xget something like this:
  1229. X.sp
  1230. X.in +2
  1231. X.nf
  1232. X[In the message entitled "This is a test.", on Jan 19,
  1233. X Dan Heller writes:]
  1234. X> This is a test message to show how
  1235. X> pre_indent_str might be used.
  1236. X.ti -2
  1237. X.sp
  1238. X.fi
  1239. XThis example assumes that the string value of
  1240. X.B indent_str
  1241. Xis not set.
  1242. X.TP
  1243. X.B post_indent_str
  1244. X(String)
  1245. XThis variable has the same function as
  1246. X.B pre_indent_str
  1247. Xexcept that the string is inserted into the message body
  1248. X.I after
  1249. Xthe text of the included message rather than before.
  1250. XThe purpose of this variable is to complement the string described by
  1251. Xthe variables
  1252. X.B pre_indent_str
  1253. Xand
  1254. X.BR indent_str .
  1255. XFor example,
  1256. X.sp
  1257. X.in +2
  1258. X.nf
  1259. Xset pre_indent_str = "/*"
  1260. Xset indent_str = " * "
  1261. Xset post_indent_str = " */"
  1262. X.sp
  1263. X.ti -2
  1264. XAn included message might look something like this:
  1265. X.sp
  1266. X/*
  1267. X * This is a test message to show how
  1268. X * post_indent_str and pre_indent_str
  1269. X * can work together with indent_str.
  1270. X */
  1271. X.fi
  1272. X.in -2
  1273. X.TP
  1274. X.B printer
  1275. X(String)
  1276. XUsed to set the default printer for the lpr command.
  1277. X.TP
  1278. X.B print_cmd
  1279. X(String)
  1280. XThis string should describe a
  1281. X.IR UNIX (TM)
  1282. Xcommand other than "lpr" for sending
  1283. Xmessages to the line printer.
  1284. XSome people may choose to use a device independent
  1285. Xtroff style program, but virtually any UNIX command will suffice.
  1286. XCommon usage might include:
  1287. X.sp
  1288. X.ti +2
  1289. Xset print_cmd = 'ptroff \-ms \-Plp'
  1290. X.ti +2
  1291. Xlpr .\-$
  1292. X.sp
  1293. XThis command would send all messages from the current message to the last
  1294. Xmessage through the ptroff command, supplying the appropriate arguments.
  1295. X.TP
  1296. X.B prompt
  1297. X(String)
  1298. XYou can set your prompt to tell you many different pieces of information.
  1299. XBy default, the prompt is set to the string
  1300. X.sp
  1301. X.ti +2
  1302. X\*QMsg %m of %t: \*U
  1303. X.sp
  1304. XIf you have 10 messages and your current message is 5, then your prompt
  1305. Xwould look like:
  1306. X.sp
  1307. X.ti +2
  1308. XMsg 5 of 10:
  1309. X.sp
  1310. XThe string value that prompt is set to will be printed as your prompt.
  1311. XIf the string contains a `%', then that character is
  1312. Xignored, the next character is evaluated and an appropriate
  1313. Xvalue is printed in its place:
  1314. X.sp
  1315. X.nf
  1316. X.in +2
  1317. X.ta 0.5i
  1318. X%F    full path name of the current folder
  1319. X%f    name of the current folder (tail of %F)
  1320. X%m    \*Qcurrent message\*U number
  1321. X%t    total number of messages
  1322. X%n    number of \*Qnew\*U messages
  1323. X%u    number of unread messages
  1324. X%d    number of deleted messages
  1325. X%T    current time (hours and seconds)
  1326. X%N    today's date (Number of the day in the month)
  1327. X%W    weekday name (Sun, Mon, Tue, ...)
  1328. X%M    current month
  1329. X%Y    this year
  1330. X%y    last two digits of %Y
  1331. X\\n    a newline
  1332. X\\t    a tab
  1333. X.fi
  1334. X.in -2
  1335. X.TP
  1336. X.B quiet
  1337. X(Boolean/Multivalued)
  1338. XThis variable tells
  1339. X.I Mush
  1340. Xto be quiet in various circumstances.
  1341. XIf set, but not to any values, the currently running version of
  1342. X.I Mush
  1343. Xis not printed on startup.
  1344. XOtherwise,
  1345. X.B quiet
  1346. Xmay be set to one or more words separated by spaces or commas.
  1347. XCurrently recognized words are:
  1348. X.sp
  1349. X.nf
  1350. X.ta 1.5i
  1351. X.in +4
  1352. X.\" \& escapes are to make obvious the tab after each word
  1353. Xautosign    Suppress messages when appending signature.
  1354. Xawait\&\&    Suppress \fBawait\fR's bell for new mail.
  1355. Xcomplete    Suppress word completion error bells.
  1356. Xfkey\&\&    Suppress warnings about unset function keys.
  1357. Xfortune\&    Suppress messages when appending fortune.
  1358. Xiconlabel    Suppress showing message count as icon label.
  1359. Xnewmail\&    Suppress new mail notification messages.
  1360. Xpick\&\&    Suppress descriptions of pick searches.
  1361. Xstartup\&    Suppress the startup message.
  1362. Xtool\&\&    Suppress tool mode bell for new mail.
  1363. X.in -4
  1364. X.fi
  1365. X.sp
  1366. XError conditions for signatures and fortunes are still reported.
  1367. XSee the variables
  1368. X.BR autosign ,
  1369. X.BR complete ,
  1370. Xand
  1371. X.B fortune
  1372. Xfor more details.
  1373. XThe
  1374. X.I newmail
  1375. Xsetting does not prevent automatic inclusion of new mail, it only
  1376. Xsuppresses the announcement of its arrival, including tool mode bells.
  1377. XThe
  1378. X.I fkey
  1379. Xsetting applies only to tool mode.
  1380. X.TP
  1381. X.B realname
  1382. X(String)
  1383. XSet to the name of the user.
  1384. XThe name is initialized to the value of the environment variable
  1385. X.B NAME
  1386. Xupon invocation of the program.
  1387. XIf that isn't set, then the name is gotten from the password file if
  1388. Xavailable.
  1389. XIf this variable wants to be reset or changed after the
  1390. Xprogram has started, the user should issue the command:
  1391. X.sp
  1392. X.ti +2
  1393. Xset realname = "Your name here"
  1394. X.TP
  1395. X.B record
  1396. X(String)
  1397. XSet to the name of a file to record all outgoing mail.
  1398. XThis should be a full pathname or the current directory is searched.
  1399. XThe pathname may begin with `+' (indicating the user's ~/Mail directory
  1400. Xor the value of the 
  1401. X.B folder
  1402. Xvariable) or with a `~' (or \*Q~user\*U)
  1403. Xindicating the user's home directory.
  1404. X.TP
  1405. X.B reply_to_hdr
  1406. X(String)
  1407. XWhen replying to mail,
  1408. X.I Mush
  1409. Xsearches for return paths from the message by searching for
  1410. Xthe message headings \*QReply-to\*U, \*QReturn-path\*U, and \*QFrom:\*U,
  1411. Xin that order.
  1412. XIf none are found, then the first line of the
  1413. Xmessage created by the delivery system is parsed and the address
  1414. Xgiven there is used.  This special message header is created by most
  1415. Xmail delivery programs, but not all of them (MMDF, for one).  This line
  1416. Xis called the
  1417. X.B From_
  1418. Xheader because it is a colon-less header, but contains the return address
  1419. Xof the author of the message.
  1420. XIf the variable
  1421. X.B reply_to_hdr
  1422. Xis set to a list of headers (delimited by spaces or commas), then that list
  1423. Xis searched.  If none of the headers listed in the variable exist
  1424. Xin the message, then a warning message is printed and the default
  1425. Xheaders are used.  The special case From_ header can be specified
  1426. Xas one of the headers to search for.
  1427. X.sp
  1428. X.nf
  1429. X.ti +2
  1430. Xset reply_to_hdr = "sender reply-to return-path from_"
  1431. X.fi
  1432. X.sp
  1433. XThis example shows that 
  1434. X.I Mush
  1435. Xwill search for (in order), the headers listed in the reply_to_hdr variable.
  1436. XIf one header isn't found, then
  1437. X.I Mush
  1438. Xlooks for the next in the list.
  1439. XIf none of the headers in the list are found, the default headers (mentioned
  1440. Xabove) are searched.
  1441. XThe last header listed in the example is the special \*QFrom \*U header.
  1442. XAlso see the
  1443. X.B reply
  1444. Xcommand.
  1445. X.TP
  1446. X.B save_empty
  1447. X(Boolean)
  1448. XNormally, when all messages in a folder are deleted and the user updates
  1449. Xthe folder or changes to a new folder, the empty folder is deleted.
  1450. X.B save_empty
  1451. Xprevents the folder from being deleted and it is left zero length.
  1452. XNote: the main system mailbox is never deleted, even when empty.
  1453. X.TP
  1454. X.B screen
  1455. X(Numeric)
  1456. XMay be set to the number of message headers to display at a time in the
  1457. Xline and curses modes.
  1458. X.TP
  1459. X.B screen_win
  1460. X(Numeric)
  1461. XMay be set to the number of message headers to display in the tool mode.
  1462. XA subwindow is created for message headers, and its size is large
  1463. Xenough to hold $screen_win headers.
  1464. X.TP
  1465. X.B sendmail
  1466. X(String)
  1467. XIf set, the program and arguments described by this variable will
  1468. Xbe executed to actually deliver mail sent by
  1469. X.I Mush.
  1470. X.TP
  1471. X.B show_deleted
  1472. X(Boolean)
  1473. XIf true, deleted message headers are displayed along with
  1474. Xother messages (`*' indicates a deleted message) for the \fBheaders\fR
  1475. Xcommand.  Also, deleted messages can be displayed using any command which
  1476. Xdisplays a message.
  1477. XIn curses mode, this variable is ignored and deleted messages are always
  1478. Xdisplayed with other messages to facilitate undeleting messages.
  1479. X.TP
  1480. X.B show_hdrs
  1481. X(Multivalued)
  1482. XSet to a list (space and/or comma separated) of headers that are to be the
  1483. Xonly headers displayed when viewing a message.
  1484. XThis variable disables the headers suppressed by the
  1485. X.B ignore
  1486. Xcommand.
  1487. XFor example,
  1488. X.sp
  1489. X.ti +2
  1490. Xset show_hdrs = \*Qfrom date subject to cc\*U
  1491. X.sp
  1492. Xwill only display the headers
  1493. X.B From: Date: Subject: To: Cc:
  1494. Xin their entirety.
  1495. X.TP
  1496. X.B sort
  1497. X(Boolean/string)
  1498. XThe value of this variable is the same as the arguments to the
  1499. X.B sort
  1500. Xcommand.
  1501. XThis variable is used for the initialization file to presort
  1502. Xmail in the system mailbox upon entering
  1503. X.IR Mush .
  1504. XSee the COMMANDS section for more information.
  1505. X.TP
  1506. X.B squeeze
  1507. X(Boolean)
  1508. XWhenever messages are read, piped, or saved, if this variable is set,
  1509. Xall consecutive blank lines are squeezed into one blank line.
  1510. X.TP
  1511. X.B status
  1512. X(Read-only numeric)
  1513. XThis variable records the success or failure status of the most recently
  1514. Xexecuted command.
  1515. XAll line-mode commands return 0 (zero) for success and a negative value for
  1516. Xerror.
  1517. XSome curses mode commands return an error status to indicate that the
  1518. Xdisplay has been corrupted, even when no actual error has occurred.
  1519. XThis variable is most useful in scripts to test the success of an operation
  1520. Xbefore proceeding.
  1521. X.TP
  1522. X.B tmpdir
  1523. X(String)
  1524. XThis variable describes the path to use as the directory
  1525. Xfor all tempfiles that
  1526. X.I Mush
  1527. Xuses.  By default, the user's home directory is used.  If that
  1528. Xcannot be accessed, a directory writable by all is used (typically, /tmp).
  1529. XIf \fBtmpdir\fR is set, then it is used first.
  1530. X.TP
  1531. X.B thisfolder
  1532. X(Read-only string)
  1533. XThe full path name of the current mailbox.
  1534. XThis variable cannot be modified or displayed by the
  1535. X.B set
  1536. Xcommand; its value changes whenever a new folder is entered with the
  1537. X.B folder
  1538. Xcommand.
  1539. XDuring sourcing of the initialization files,
  1540. X.B thisfolder
  1541. Xis not set, because the current folder has not yet been read.
  1542. XIf you refer to \*Q$thisfolder\*U in an initialization file
  1543. X.RI ( e.g. ,
  1544. X.IR .mushrc ),
  1545. Xbe sure to do so inside an \*Qif $?thisfolder\*U test.
  1546. X.TP
  1547. X.B toplines
  1548. X(Numeric)
  1549. XThe number of lines of a message to print when the
  1550. X.B top
  1551. Xcommand is issued.  If unset, $crt lines are printed.
  1552. XNote that the message body only is printed when using the
  1553. X.B top
  1554. Xcommand; message headers are not counted as lines since they are not displayed.
  1555. X.TP
  1556. X.B unix
  1557. X(Boolean)
  1558. XIf set, commands that are not
  1559. X.I Mush
  1560. Xcommands are considered to be
  1561. X.IR UNIX (TM)
  1562. Xcommands.
  1563. XThis removes the inconvenience of requiring the user to do
  1564. Xshell escapes to do quick
  1565. X.I UNIX
  1566. Xcommands.
  1567. XFor systems that support job control, SIGTSTP will stop the entire shell as
  1568. Xwell as the process being executed.
  1569. XWhen SIGCONT is delivered, both will receive the
  1570. Xsignal and the shell will continue to wait for the job to finish.
  1571. X.sp
  1572. XDue to the lack of real job control, input/output redirection and UNIX command
  1573. Xpiping, this mode of the shell is not intended to be used as a login shell.
  1574. X.sp
  1575. XIf a
  1576. X.I Mush
  1577. Xcommand conflicts with a
  1578. X.I UNIX
  1579. Xcommand, use the command
  1580. X.B sh
  1581. Xto force execution as a shell command or use the full pathname of the command
  1582. X(e.g. starting with a '/').
  1583. X.sp
  1584. X.BR Warning :
  1585. X.I "Be aware that Mush pipes transmit message lists, NOT TEXT."
  1586. XYou cannot pipe the output of
  1587. X.I UNIX
  1588. Xcommands to or from
  1589. X.I Mush
  1590. Xcommands or other
  1591. X.I UNIX
  1592. Xcommands with the
  1593. X.I Mush
  1594. Xpipe mechanism.  You can, however, pipe
  1595. X.I Mush
  1596. Xcommands to a final UNIX
  1597. Xcommand (see the \fBpipe\fR command for more information).
  1598. XUNIX commands should be simple commands without pipes or metacharacters.
  1599. X.sp
  1600. XThis feature is not available for the tool mode.
  1601. X.TP
  1602. X.B verbose
  1603. X(Boolean)
  1604. XPasses verbose flag to mail delivery systems when sending mail, and
  1605. Xcauses
  1606. X.I Mush
  1607. Xto print additional information about the sending process.
  1608. X.TP
  1609. X.B verify
  1610. X(Boolean)
  1611. XWhen through editing messages, just before sending,
  1612. X.B verify
  1613. Xwill ask you if you want to send, continue editing, or abort the
  1614. Xwhole message altogether.
  1615. X.TP
  1616. X.B version
  1617. X(Read-only String)
  1618. XThe value of this variable is the version string, printed by
  1619. X.I Mush
  1620. Xat startup (unless
  1621. X.B quiet
  1622. Xis set) and included in the \*QX-Mailer:\*U header in messages.
  1623. X.TP
  1624. X.B visual
  1625. X(String)
  1626. XMay be set to the visual editor to use when ~v is specified.
  1627. XDefault is vi or the environment string VISUAL.
  1628. XThe visual editor is invoked by the \-e arguments to the
  1629. Xcommands, 
  1630. END_OF_FILE
  1631. if test 50362 -ne `wc -c <'mush/mush.1.c'`; then
  1632.     echo shar: \"'mush/mush.1.c'\" unpacked with wrong size!
  1633. fi
  1634. # end of 'mush/mush.1.c'
  1635. fi
  1636. if test -f 'mush/strings.h' -a "${1}" != "-c" ; then 
  1637.   echo shar: Will not clobber existing file \"'mush/strings.h'\"
  1638. else
  1639. echo shar: Extracting \"'mush/strings.h'\" \(1332 characters\)
  1640. sed "s/^X//" >'mush/strings.h' <<'END_OF_FILE'
  1641. X/* @(#)strings.h    (c) copyright 9/3/86 (Dan Heller) */
  1642. X
  1643. X/*
  1644. X * If you *know* your sprintf() returns char*, you can remove the follow
  1645. X * define.  Careful, "new" 4.3BSD's sprintf returns int.  See README
  1646. X */
  1647. X#define sprintf Sprintf
  1648. X#ifdef SYSV
  1649. X#define    index    strchr
  1650. X#define    rindex    strrchr
  1651. X#endif /* SYSV */
  1652. X
  1653. X/* External function definitions for routines described in string(3).  */
  1654. Xextern char
  1655. X    *strcat(), *strncat(), *strcpy(), *strncpy(),
  1656. X    *index(), *rindex(), *getenv();
  1657. Xextern int
  1658. X    strcmp(), strncmp(), strlen();
  1659. X
  1660. Xextern char
  1661. X    *Sprintf(),        /* See comments above function in strings.c */
  1662. X    *argv_to_string(),    /* convert a vector of strings into one string */
  1663. X    *any(),         /* return first char in str2 that exists in str1 */
  1664. X    *ctrl_strcpy(),    /* string copy converting control chars to ascii */
  1665. X    *itoa(),        /* return a string representation of a number */
  1666. X    *lcase_strcpy(),    /* just like strcpy, but convert all chars to lower */
  1667. X    *m_xlate(),        /* translate string from ascii to ctrl-char format */
  1668. X    *my_atoi(),     /* do an atoi, but return the last char parsed */
  1669. X    *no_newln(),    /* remove newline and extra whitespace - return end */
  1670. X    *savestr();        /* strcpy arg into malloc-ed memory; return address */
  1671. X
  1672. Xextern void
  1673. X    print_argv(),    /* prints an argv as one string */
  1674. X    putstring();    /* put a string */
  1675. END_OF_FILE
  1676. if test 1332 -ne `wc -c <'mush/strings.h'`; then
  1677.     echo shar: \"'mush/strings.h'\" unpacked with wrong size!
  1678. fi
  1679. # end of 'mush/strings.h'
  1680. fi
  1681. echo shar: End of archive 1 \(of 19\).
  1682. cp /dev/null ark1isdone
  1683. MISSING=""
  1684. for I in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 ; do
  1685.     if test ! -f ark${I}isdone ; then
  1686.     MISSING="${MISSING} ${I}"
  1687.     fi
  1688. done
  1689. if test "${MISSING}" = "" ; then
  1690.     echo You have unpacked all 19 archives.
  1691.     rm -f ark[1-9]isdone ark[1-9][0-9]isdone
  1692. else
  1693.     echo You still need to unpack the following archives:
  1694.     echo "        " ${MISSING}
  1695. fi
  1696. ##  End of shell archive.
  1697. exit 0
  1698.  
  1699.